package com.kasangadu.generation.server.impl;

import javax.jdo.PersistenceManager;

import com.kasangadu.generation.server.GenerationStorageManager;
import com.kasangadu.generation.server.Human;
import com.kasangadu.generation.server.IGenerationDataOperation;

public class HumanImpl implements IGenerationDataOperation<Human> {	
	
	Human data;
	
	public HumanImpl(Human data)
	{
		this.data = data;
	}
	
	public HumanImpl()
	{
		this.data = new Human();
	}
	
	public Human getHuman()
	{
		return data;
	}
	
	public void save()
	{
		PersistenceManager pm = GenerationStorageManager.get().getPersistenceManager();
		try
		{			
			pm.makePersistent(data);
		}
		finally
		{
			pm.close();			
		}		
	}
	

	@Override
	public void delete() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public Human getObject(String condition) {
		// TODO Auto-generated method stub
		return null;
	}
}
	
	